package com.yonyou.cyxdms.basedata.service.controller.basedata;

import com.yonyou.cyxdms.basedata.service.dto.systemparam.GeneralSystemParamsDTO;
import com.yonyou.cyxdms.basedata.service.service.basedata.BasicComService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 基础参数设置
 *
 * @author RenWeiDong
 * @date 2017年5月24日
 */
@RestController
@RequestMapping("/BasicParameters")
public class BasicComController {

    @Autowired
    private BasicComService basicComService;

    /**
     * 查询基础参数信息
     *
     * @param queryParam
     * @return java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>
     * @author dengqiang
     * @since 2019/8/6
     */
    @GetMapping(value = "/basicCommunal")
    @ResponseBody
    public Map<String, Map<String, Object>> queryBasicParameters(@RequestParam Map<String, String> queryParam) {
       return basicComService.queryBasicParameters(queryParam);
    }


    /**
     * 新增 - 系统基础参数
     *
     * @param generalSystemParamsDTO
     * @author：chenzb
     * @since：2019-11-06
     */
    @ApiOperation(value = "新增系统参数")
    @PostMapping(value = "/addGeneralSystemParam")
    public void addGeneralSystemParam(@RequestBody GeneralSystemParamsDTO generalSystemParamsDTO){
        basicComService.addGeneralSystemParam(generalSystemParamsDTO);
    }
}
